import Vue from 'vue'
import Router from 'vue-router'
import Home from '../Home'
import Getstart from '../Getstart'
import Api from '../Api'
import About from '../About'
import Signin from '../Signin'
import UserInfo from '../UserInfo'
import ListInfo from '../ListInfo'

Vue.use(Router)

export default new Router({
  //模式默认为hash模式默认在地址后面会加上一个#字符
  mode:'history',
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Home
    },
    {
      path: '/getstart',
      name: 'Getstart',
      component: Getstart
    },
    {
      path: '/api',
      name: 'Api',
      component: Api
    },
    {
      path: '/about',
      name: 'About',
      component: About
    },
    {
      path: '/signin',
      name: 'Signin',
      component: Signin
    },
    {
      path: '/user/:loginname',
      name: 'UserInfo',
      component: UserInfo
    },
    {
      path: '/topic/:id',
      name: 'ListInfo',
      component: ListInfo
    }
  ]
})
